package com.felight.list;

import java.util.Comparator;

/**
 * Flower price are compared and returns integer value(0,1 or -1).
 * 
 * @author soumya
 * 
 */
public class FlowerPriceComparator implements Comparator<Flower> {
	@Override
	public int compare(Flower o1, Flower o2) {
		if (o1.price == o2.price) {
			return 0;
		} else if (o1.price > o2.price) {
			return 1;
		} else
			return -1;
	}
}
